{__NOLAYOUT__}<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>大拇哥资源共享平台</title>
    <!--视口 不缩放 -->
    <meta name="viewport" content="user-scalable=no,width=device-width, initial-scale=1.0,  minimum-scale=1.0, maximum-scale=1.0">
    <meta name="flexible" content="initial-dpr=1" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <!-- 网页作者 -->
    <meta name="author" content="hg" />
    <!-- 添加到主屏后的标题（iOS 6 新增） -->
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <!-- 是否启用 WebApp 全屏模式，删除苹果默认的工具栏和菜单栏 -->
    <meta name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL">
    <!-- 设置苹果工具栏颜色 -->
    <meta name="format-detection" content="telphone=no, email=no" />
    <!-- 忽略页面中的数字识别为电话，忽略email识别 -->
    <!-- 启用360浏览器的极速模式(webkit) -->
    <meta name="renderer" content="webkit">
    <!-- 不让百度转码 -->
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <!-- windows phone 点击无高光 -->
    <meta name="msapplication-tap-highlight" content="no">
    <meta name="msapplication-TileColor" content="#000" />
    <!--<link href="logo.ico" rel="shortcut icon" type="image/x-icon">-->
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <link rel="shortcut icon" href="favicon.ico">
    
    
    <!-- ZUI1.7.0 -->
    <link href="https://cdnjs.cloudflare.com/ajax/libs/zui/1.7.0/css/zui.min.css" rel="stylesheet">
    
    <!-- Swiper -->
    <link href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.4.2/css/swiper.min.css" rel="stylesheet">
    
    <link href="__PUBLIC__/dist/css/mobile.css" rel="stylesheet">

</head>
<body>
<div id="page">
    <!-- Header -->
      <include file="Index:nav" />
    <!-- Header End -->

    <div class="banner"><img src="__PUBLIC__/dist/image/mobile-banner.jpg"></div>

    <!-- 项目列表 start -->
    <div class="container clearfix pt-40">
        <section class="new-main">
            <div class="new-card swiper-container">
                <div class="swiper-wrapper">
                    <!--推荐 -->
                    <volist name='tuijian' id='vo'>
                    <div class="swiper-slide">
                        <a href='index.php?g=mobile&m=Index&a=newsdetails&id={$vo.id}'> <img src="__PUBLIC__/dist/image/img.jpg" data-src="http://hgedu.fjhgkj.com{$vo.bannerimg}">
                            <p class="text-ellipsis">{$vo.title}</p></a>
                    </div>
                    </volist>
                      <!--热门 -->
                       <volist name='remen' id='vo'>
                    <div class="swiper-slide">
                        <a href='index.php?g=mobile&m=Index&a=newsdetails&id={$vo.id}'> <img src="__PUBLIC__/dist/image/img.jpg" data-src="http://hgedu.fjhgkj.com{$vo.thumb}">
                            <p class="text-ellipsis">{$vo.title}</p></a>
                    </div>
                    </volist>
                </div>
            </div>

            <div class="new-type pt-40 mb-10"><a class="active" data-catid='23'>学校</a><a data-catid='24'>业界</a><a data-catid='25'>企业</a><a data-catid='26'>公告</a><a data-catid='27'>文件</a></div>
            <div class="new-list">
                <ul id="schoolid">
                                    
                </ul>
                <a class="btn-more">加载更多</a>
            </div>
        </section>
    </div>
    
</div>


<script src="//cdnjs.cloudflare.com/ajax/libs/zui/1.7.0/lib/jquery/jquery.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/zui/1.7.0/js/zui.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.4.2/js/swiper.min.js"></script>
<!-- qrcode 二维码 -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.qrcode/1.0/jquery.qrcode.min.js"></script>
<script src="__PUBLIC__/dist/js/main.js"></script>
<script>
$(function(){
    var swiper = new Swiper('.swiper-container', {
        autoplay: 3000, //可选选项，自动滑动
    })
    
     $("#schoolid").on("click",".zan",function(){
        // 点赞
        var nid = $(this).find("i").data('aid') ;
         $.ajax({
           type: "POST",
           url: "index.php?g=Home&m=Index&a=zanarticle",
           data: "nid="+nid,
           dataType: "json",
           success: function(resp)
           {
              if(resp.code=='0002'){
                  alert(resp.msg) ;
                  window.location.href='http://user.fjhgkj.com.cn/index.php?u=jzzy&url={$url1}';
              }else if(resp.code=='0000'){
                   $("#schoolid #art"+nid).find("span").html(resp.zan) ;
                    $("#schoolid #art"+nid).find("i").addClass("on")
                  alert(resp.msg) ;
              }else{
                  alert(resp.msg) ;
              }
           }
            });
        
    })
    
    
    var i = 1 ;
    $(".new-type a").on("click", function(){
        if($(this).hasClass('active')){
            alert('您已经在这个栏目了，请点击别的栏目') ;
            return false ;
        }
        $("#schoolid").html('') ;
        $('.btn-more').attr("data-p", 1);
        $('.btn-more').html("加载更多");
        i = 1 ;
         var catid = $(this).data('catid') ;
         $('.new-type a').removeClass("active");
         $(this).addClass("active");
         refreshlist(catid,1) ;
    })
    
     //加载更多
          $('.btn-more').on('click',function(){
              i = i + 1 ;
              var cat = $('.new-type a.active').data('catid') ;
              refreshlist(cat,i) ;
         })
})

    function refreshlist(aa,bb){
           $.ajax({
           type: "POST",
           url: "index.php?g=Mobile&m=Index&a=getnews",
           data: "catid="+aa+"&page="+bb,
           dataType: "json",
           success: function(resp)
           {
            if(resp != null){
                var strHTML = '';
                $.each(resp, function(k, item) {
                    
                    strHTML += '<li><a href="index.php?g=mobile&m=Index&a=newsdetails&id='+item.id+'"><img src="http://hgedu.fjhgkj.com'+item.thumb+'" data-src="http://hgedu.fjhgkj.com'+item.thumb+'">'
                    strHTML += '<h3 class="text-ellipsis">'+item.title+'</h3>';
                    strHTML += '<p class="text-ellipsis">'+item.description+'</p>';
                    strHTML += '<div class="card-info-item clearfix">';
                    strHTML += '<label><i class="icon-fwl"></i>'+item.hits+'</label>';
                    if(item.yizan == 2){
                        strHTML += '<label><a class="zan" id="art'+item.id+'"><i class="icon-zan" data-aid="'+item.id+'"></i><span>'+item.zan+'</span></a></label>';
                    }else{
                        strHTML += '<label><a class="zan" id="art'+item.id+'"><i class="icon-zan on" data-aid="'+item.id+'"></i><span>'+item.zan+'</span></a></label>';
                    }
                    strHTML += '<label class="pull-right"><i class="icon-time"></i>'+item.createtime+'</label>';
                    strHTML += '</div></a></li>';
   
                });
                $("#schoolid").append(strHTML) ;
            }else{
                $(".btn-more").html('没有更多') ;
            }
            }        
        });
    }
    
     refreshlist(23, 1);
</script>
</body>
</html>